ci(release): automate release PRs and npm publishing#35
Conversation
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 14 minutes and 31 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThree new files establish release automation using GitHub Actions and Release Please. A workflow ( Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
commit: |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e3b7defd28
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| on: | ||
| push: | ||
| branches: | ||
| - master |
There was a problem hiding this comment.
Add main branch to release workflow trigger
This workflow only runs on pushes to master, so repositories that release from main will never execute release-please and therefore never open/update release PRs or publish to npm. In this repo, other automation already treats main as an active branch (for example .github/workflows/ci.yml and pkg-pr-new-preview.yml include main), so limiting this trigger to master introduces a release pipeline gap whenever changes land on main.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Pull request overview
Adds automated release management and npm publishing via Release Please, seeding initial manifest state to the current package version.
Changes:
- Introduces
release-pleaseGitHub Actions workflow to open/update release PRs from conventional commits. - Adds a follow-up job to publish the package to npm (with provenance) when a release is created.
- Seeds Release Please config/manifest state at version
0.5.10.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
release-please-config.json |
Configures Release Please for a Node package with v-prefixed tags. |
.release-please-manifest.json |
Seeds initial release-please version state (0.5.10). |
.github/workflows/release-please.yml |
Automates release PR creation and npm publishing from release tags. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| on: | ||
| push: | ||
| branches: |
There was a problem hiding this comment.
The workflow only runs on pushes to master. Other workflows in this repo run on both main and master (e.g. .github/workflows/ci.yml:6-9), so releases may never be prepared if the default branch is main. Consider adding main here (or otherwise aligning this list with the repo’s default/release branch).
| branches: | |
| branches: | |
| - main |
| id: release | ||
| uses: googleapis/release-please-action@16a9c90856f42705d54a6fda1823352bdc62cf38 # v4.4.0 | ||
| with: | ||
| token: ${{ secrets.GITHUB_TOKEN }} |
There was a problem hiding this comment.
Using secrets.GITHUB_TOKEN here can cause Release Please-created PRs/tags/releases to not trigger other GitHub Actions workflows (GitHub suppresses workflow runs triggered by the workflow token). If you expect CI checks to run on the release PR before merging, use a dedicated PAT/GitHub App token stored as a secret (and pass it to token:) instead of GITHUB_TOKEN.
| token: ${{ secrets.GITHUB_TOKEN }} | |
| token: ${{ secrets.RELEASE_PLEASE_TOKEN }} |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.github/workflows/release-please.yml:
- Around line 67-70: The "Publish package" CI step currently runs `pnpm publish
--access public --no-git-checks --provenance` and will fail if retried because
the version already exists; update that step to perform an idempotency check
before calling `pnpm publish`: read package name and version (from package.json
or your release metadata), query the registry for that specific version (e.g.,
`pnpm info <pkg>@<version>` or `npm view <pkg>@<version>` using NODE_AUTH_TOKEN)
and if the version exists, skip the publish step with a clear message, otherwise
run the existing `pnpm publish ...` command. Ensure this logic is implemented
inside the same "Publish package" job/step so retries are safe.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 41f55715-99f7-4541-8ff1-e7bda034b2f0
📒 Files selected for processing (3)
.github/workflows/release-please.yml.release-please-manifest.jsonrelease-please-config.json
Summary
Release Pleaseworkflow usinggoogleapis/release-please-actionto automatically open/update release PRs from conventional commitsrelease-please-config.jsonand.release-please-manifest.jsonseeded to0.5.10to initialize release-please state for this packageValidation
rtk lintoutput failed to parse in this environment, so workflow validation is expected to come from GitHub Actions checksSummary by CodeRabbit